vitalsFacade
Class VitalsFacade

java.lang.Object
  extended byvitalsFacade.VitalsFacade

public class VitalsFacade
extends java.lang.Object

VitalsFacade Facade from the application facade pattern.

Version:
2004-09-10
Author:
Sascha Hemminger

Constructor Summary
VitalsFacade(Patient subject)
          Sole constructor for the application facade.
 
Method Summary
 java.lang.String getBloodPressureDiastolic()
          Searches the value for the diastolic blood pressure attribute and gives a string representing the value.
 java.lang.String getBloodPressureDiastolicName()
          Searches the phenomenon that describes the quality of the diastolic blood pressure (eg.
 java.lang.String getBloodPressureSystolic()
          Searches the latest value of the systolic blood pressure and gives a string representing it.
 java.lang.String getBloodPressureSystolicName()
          Searches the phenomenon that describes the quality of the diastolic blood pressure (eg.
 java.lang.String getBMI()
          Gives the calculated body mass index of the patient.
 java.lang.String getBMIName()
          Gives a valuation in quality for the BMI (eg.
 java.lang.String getBreathingRate()
          Searches the latest value for a patient's breathing rate and gives a string representation.
 java.lang.String getBreathingRateName()
          Gives a valuation in quality for the breathing rate (eg.
 java.util.Date getDate()
          Used to decide whether a measurement is the latest or not.
 java.lang.String getGender()
          Should be self-explanatory!
 java.lang.String getHeartRate()
          Searches the latest value of a patient's heart rate and gives a string representation.
 java.lang.String getHeartRateName()
          Gives a valuation in quality for the heart rate (eg.
 java.lang.String getHeight()
          Gives patient's heigth in inches.
 java.lang.String getLevelOfConsciousness()
          Gives a patient's level of consciousness (eg.
 java.util.Enumeration getLevelOfConsciousnessValues()
          Use this if you want to get to know all possible values of LOC.
 java.lang.String getName()
          Gives the patient's name.
 boolean getShock()
          Lets you see if patient is in shock.
 Patient getSubject()
          Gets the actual patient object.
 java.lang.String getWeight()
          Gives a patient's weight.
 void loadAttributes()
          Loads all attributes related to the patient.
 void saveAttributes()
          Saves the actual values of the attributes.
 void setBloodPressureDiastolic(java.lang.String pressure)
          Sets the diastolic blood pressure.
 void setBloodPressureSystolic(java.lang.String pressure)
          Sets the systolic blood pressure.
 void setBreathingRate(java.lang.String newRate)
          Sets the breathing rate.
 void setGender(java.lang.String gender)
          Sets the patient's gender.
 void setHeartRate(java.lang.String newRate)
          Sets a new heart rate value.
 void setHeight(java.lang.String height)
          Sets the height of the patient.
 void setLevelOfConsciousness(java.lang.String loc)
          Sets a level of consciousness.
 void setShock(boolean isInShock)
          Sets if patient is in shock.
 void setSubject(java.lang.String name)
          Saves the actual patient's data and loads another.
 void setWeight(java.lang.String weight)
          Sets the patient's weight.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VitalsFacade

public VitalsFacade(Patient subject)
Sole constructor for the application facade.

Parameters:
subject - the patient you are dealing with at the moment
Method Detail

getBloodPressureDiastolic

public java.lang.String getBloodPressureDiastolic()
Searches the value for the diastolic blood pressure attribute and gives a string representing the value.

Returns:
the diastolic blood pressure in mm/Hg if saved else empty string
See Also:
setBloodPressureDiastolic(java.lang.String)

getBloodPressureDiastolicName

public java.lang.String getBloodPressureDiastolicName()
Searches the phenomenon that describes the quality of the diastolic blood pressure (eg. 'high').

Returns:
a valuation in quality for the diastolic blood pressure if diastolic blood pressure is saved else empty string

getBloodPressureSystolic

public java.lang.String getBloodPressureSystolic()
Searches the latest value of the systolic blood pressure and gives a string representing it.

Returns:
the systolic blood pressure in mm/Hg if saved else empty string
See Also:
setBloodPressureSystolic(String)

getBloodPressureSystolicName

public java.lang.String getBloodPressureSystolicName()
Searches the phenomenon that describes the quality of the diastolic blood pressure (eg. 'high').

Returns:
a valuation in quality for the systolic blood pressure if systolic blood pressure is saved else empty string

getBMI

public java.lang.String getBMI()
Gives the calculated body mass index of the patient.

Returns:
body mass index of the patient if saved else empty string

getBMIName

public java.lang.String getBMIName()
Gives a valuation in quality for the BMI (eg. 'obese') if all necessary data (height, weight and gender) exists.

Returns:
a valuation in quality for the calculated body mass index

getBreathingRate

public java.lang.String getBreathingRate()
Searches the latest value for a patient's breathing rate and gives a string representation.

Returns:
latest breathing in breaths/min rate if saved else empty string
See Also:
setBreathingRate(String)

getBreathingRateName

public java.lang.String getBreathingRateName()
Gives a valuation in quality for the breathing rate (eg. 'normal').

Returns:
a valuation in quality for the actual breathing rate if breathing rate is saved else empty string

getDate

public java.util.Date getDate()
Used to decide whether a measurement is the latest or not.

Returns:
actual date

getGender

public java.lang.String getGender()
Should be self-explanatory!

Returns:
a patient's gender (male or female ;))
See Also:
setGender(String)

getHeartRate

public java.lang.String getHeartRate()
Searches the latest value of a patient's heart rate and gives a string representation.

Returns:
latest heart rate in beats/min if saved else empty string
See Also:
setHeartRate(String)

getHeartRateName

public java.lang.String getHeartRateName()
Gives a valuation in quality for the heart rate (eg. 'fast).

Returns:
a valuation in quality for the actual heart rate if heart rate is saved else empty string

getHeight

public java.lang.String getHeight()
Gives patient's heigth in inches.

Returns:
the patient's height in inches if saved else empty string
See Also:
setHeight(String)

getLevelOfConsciousness

public java.lang.String getLevelOfConsciousness()
Gives a patient's level of consciousness (eg. 'aware').

Returns:
a patient's level of consciousness
See Also:
setLevelOfConsciousness(String)

getLevelOfConsciousnessValues

public java.util.Enumeration getLevelOfConsciousnessValues()
Use this if you want to get to know all possible values of LOC.

Returns:
a list of all legal levels of consciousness (most likely aware, verbal, pain and unresponsive);

getName

public java.lang.String getName()
Gives the patient's name.

Returns:
the patient's name

getShock

public boolean getShock()
Lets you see if patient is in shock.

Returns:
true if patient is in shock else false
See Also:
setShock(boolean)

getSubject

public Patient getSubject()
Gets the actual patient object.

Returns:
patient loaded at the moment
See Also:
setSubject(String)

getWeight

public java.lang.String getWeight()
Gives a patient's weight.

Returns:
weight of the patient measured in pounds if saved else empty string
See Also:
setWeight(String)

loadAttributes

public void loadAttributes()
Loads all attributes related to the patient.


saveAttributes

public void saveAttributes()
Saves the actual values of the attributes.


setBloodPressureDiastolic

public void setBloodPressureDiastolic(java.lang.String pressure)
Sets the diastolic blood pressure.

Parameters:
pressure - observed diastolic blood pressure in mm/Hg
See Also:
getBloodPressureDiastolic()

setBloodPressureSystolic

public void setBloodPressureSystolic(java.lang.String pressure)
Sets the systolic blood pressure.

Parameters:
pressure - observed systolic blood pressure in mm/Hg
See Also:
getBloodPressureSystolic()

setBreathingRate

public void setBreathingRate(java.lang.String newRate)
Sets the breathing rate.

Parameters:
newRate - observed breathing rate in breaths/min
See Also:
getBreathingRate()

setGender

public void setGender(java.lang.String gender)
Sets the patient's gender.

Parameters:
gender - the patient's gender
See Also:
getGender()

setHeartRate

public void setHeartRate(java.lang.String newRate)
Sets a new heart rate value.

Parameters:
newRate - observed heart rate in beats/min
See Also:
getHeartRate()

setHeight

public void setHeight(java.lang.String height)
Sets the height of the patient.

Parameters:
height - patient's height in inches
See Also:
getHeight()

setLevelOfConsciousness

public void setLevelOfConsciousness(java.lang.String loc)
Sets a level of consciousness.

Parameters:
loc - observed level of consciousness
See Also:
getLevelOfConsciousness()

setShock

public void setShock(boolean isInShock)
Sets if patient is in shock.

Parameters:
isInShock - true if observed the patient is in shock
See Also:
getShock()

setSubject

public void setSubject(java.lang.String name)
Saves the actual patient's data and loads another.

Parameters:
name - the name of the patient you want to load
See Also:
getSubject()

setWeight

public void setWeight(java.lang.String weight)
Sets the patient's weight.

Parameters:
weight - patient's weight in pounds
See Also:
getWeight()